<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/base.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="UTF-8">
    <title>项目管理系统</title>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
</head>
	<body class="body">
  	<%@include file="../include/top.jsp" %>
    <div class="container">
    	<div class="row">
    		
	<%@include file="../include/left.jsp" %>
	
    		<div class="span9">
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
				<li class="active">
					<a href="document.jspx"><i class="icon-folder-open"></i>资料</a>
				</li>
				<li class="pull-right"><i class="icon-plus"></i><a href="new_document.jspx" class="link-black">分享新资料</a></li>
			</ul>
			<div class="wall" style="margin-bottom:20px;">
			<c:forEach items="${page.list}" var="d">
				<blockquote>
				<c:if test="${not empty sessionScope.error }">
        		<div class="alert alert-error">
  					${sessionScope.error }
				</div>
				<c:remove var="error" scope="session"/>
        	</c:if>
				  <h4><a href="documentShow.jspx?id=${d.id}">${d.title }</a></h4>
				  <p style="font-size:14px;line-height:1.5;">${d.content }</p>
				  <small>${user.name}发布于 1个月前</small>
				  <a href="documentedit.jspx?id=${d.id }" title="编辑"><i class="icon-pencil"></i></a>
				  <a href="javascript:;" class="del_link" rel="${d.id }"  title="删除"><i class="icon-trash"></i></a>
				</blockquote>
				</c:forEach>
				
				<div class="pagination pull-right">
				
				  <ul>
					<li><a href="#">Prev</a></li>
					<li class="active">
					  <a href="#">1</a>
					</li>
					<li><a href="#">2</a></li>
					<li><a href="#">3</a></li>
					<li><a href="#">4</a></li>
					<li><a href="#">Next</a></li>
				  </ul>
				</div>
				
				<div class="clear"></div>
			</div>
		</div>
	  </div>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$(".del_link").click(function(){
				if(confirm("确定要删除该记录吗？")) {
					location.href="documentdel.jspx?id="+$(this).attr("rel");
				}
			});
		});
	
	
	</script>
  </body>
</html>
